

package com.hazelcast.internal.util.collection;

import java.util.Collection;

/**
 * An immutable {@link PartitionIdSet}.
 */
public final class ImmutablePartitionIdSet extends PartitionIdSet {

    ImmutablePartitionIdSet() {
    }

    public ImmutablePartitionIdSet(int partitionCount, Collection<Integer> initialPartitionIds) {
        super(partitionCount, initialPartitionIds);
    }

    @Override
    public boolean add(Integer partitionId) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean add(int partitionId) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void addAll(PartitionIdSet other) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean remove(Object o) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean remove(int partitionId) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void clear() {
        throw new UnsupportedOperationException();
    }

    @Override
    public void union(PartitionIdSet other) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void removeAll(PartitionIdSet other) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void complement() {
        throw new UnsupportedOperationException();
    }

    @Override
    public int getClassId() {
        return UtilCollectionSerializerHook.IMMUTABLE_PARTITION_ID_SET;
    }
}
